<template>
	<view>
		<!-- 在线签到 -->
		<!-- 顶部用户信息卡 -->
		<UserInfoCardVue></UserInfoCardVue>
		<!-- Tab栏 -->
		<Tabs :activeTab="activeTab" @change-tab="changeTab" />
		<view class="online-sign-page">

			<!-- 就诊卡片 -->
			<Treatment :treatment-sign-info="treatmentSignInfo" v-if="activeTab === 'treatment'" />

			<!-- 取药卡片 -->
			<Medicine :medicine-sign-info="medicineSignInfo" v-if="activeTab === 'medicine'" />

			<!-- 检查卡片 -->
			<Examine :examine-sign-info="examineSignInfo" v-if="activeTab === 'examine'" />

			<!-- 检验卡片 -->
			<Inspection :inspection-sign-info="inspectionSignInfo" v-if="activeTab === 'inspection'" />
		</view>
	</view>
</template>

<script>
	import Examine from './components/Sign/examine.vue';
	import Inspection from './components/Sign/inspection.vue';
	import Medicine from './components/Sign/medicine.vue';
	import Tabs from './components/tabs.vue'
	import Treatment from './components/Sign/treatment.vue';
	import UserInfoCardVue from '../../../components/UserInfo/UserInfoCard.vue';
	import {
		mapGetters
	} from 'vuex'
	export default {
		components: {
			Tabs,
			Treatment,
			Medicine,
			Examine,
			Inspection,
			UserInfoCardVue
		},
		computed: {
			...mapGetters(['userInfo', "hostApi"]),
		},
		data() {
			return {

				activeTab: 'treatment',
				treatmentSignInfo: [{
					department: '小儿内科',
					clinicNo: '0014969222',
					doctor: '肖友明（副主任医师）',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊三楼B区外科诊区305',
					time: '2024-09-12  周一  10:00~10:30',
					ordinal: '',
				}, ],
				medicineSignInfo: [{
					type: '中药房',
					clinicNo: '0014969222',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊一楼药房',
					window: '8号窗口',
					ordinal: '',
				}, ],
				examineSignInfo: [{
					department: '小儿内科',
					clinicNo: '0014969222',
					project: '颅脑核磁共振成像（MRI）',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊三楼B区外科诊区305',
					room: '2检查室',
					time: '2024-09-12  周一  10:00~10:30',
					ordinal: '',
					notice: '检查前避免剧烈运动'
				}, ],
				inspectionSignInfo: [{
					department: '小儿内科',
					clinicNo: '0014969222',
					project: '血常规',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊三楼B区外科诊区305',
					room: '2检查室',
					time: '2024-09-12  周一  10:00~10:30',
					ordinal: '',
					notice: '空腹检查，前8小时内不得进食进水。空腹检查，前8小时内不得进食进水。空腹检查，前8小时内不得进食进水。'
				}, ],
			};
		},
		mounted() {
			this.init()
		},
		methods: {
			init(){
				
			},
			changeTab(tab) {
				this.activeTab = tab;
			},
		},
	};
</script>

<style lang="scss" scoped>
	.online-sign-page {
		background: linear-gradient(#e0f3ff 0%, #fff 30%);
		min-height: 100vh;
		padding: 16rpx;
	}
</style>